package com.hxm.appGenealogy.config.client;

import com.hxm.appGenealogy.config.client.HttpClientPoolUtil;

import java.util.Map;

/**
 * 
 *<p>Title:SdkClient</p>
 *<p>Description:客户端调用工具类</p>
 *<p>Company:浙江大华技术股份有限公司</p>
 * @author 32174
 * @date 2018年12月18日
 */
public class SdkClient {
	

	/**
	 * 
	 * @Title:get
	 * @Description:get请求
	 * @param:@param url
	 * @param:@param headMap
	 * @param:@return
	 * @param:@throws Exception
	 * @return:String
	 * @throws
	 *
	 */
	public static String get(String url,Map<String, String> headMap) throws Exception{

		return HttpClientPoolUtil.get(url, headMap);
	}

	/**
	 * 
	 * @Title:post
	 * @Description:post请求
	 * @param:@param url
	 * @param:@param data JSON序列化后的参数 JSON.toJSONString(xxx)
	 * @param:@param headMap
	 * @param:@return
	 * @param:@throws Exception
	 * @return:String
	 * @throws
	 *
	 */
	public static String post(String url,String data,Map<String, String> headMap) throws Exception{


		return HttpClientPoolUtil.post(url, data, headMap);
	}

	/**
	 * 
	 * @Title:put
	 * @Description:put请求
	 * @param:@param url
	 * @param:@param data JSON序列化后的参数 JSON.toJSONString(xxx)
	 * @param:@param headMap
	 * @param:@return
	 * @param:@throws Exception
	 * @return:String
	 * @throws
	 *
	 */
	public static String put(String url,String data,Map<String, String> headMap) throws Exception{
		return HttpClientPoolUtil.put(url, data, headMap);
	}

	/**
	 * 
	 * @Title:delete
	 * @Description:delete请求
	 * @param:@param url
	 * @param:@param data JSON序列化后的参数 JSON.toJSONString(xxx)
	 * @param:@param headMap
	 * @param:@return
	 * @param:@throws Exception
	 * @return:String
	 * @throws
	 *
	 */
	public static String delete(String url,String data,Map<String, String> headMap) throws Exception{
		return HttpClientPoolUtil.delete(url, headMap);
	}

}
